import request from '@/utils/request'

// 品质-核心指标
export function findQualityCoreRate(date) {
  return request({
    url: '/app/v1/produces/quality/core/rate',
    method: 'get',
    params: { date }
  })
}

// 品质-获取各分厂合格率
export function findBranchFactoryQualifiedRate(date) {
  return request({
    url: '/app/v1/produces/quality/factory/rate',
    method: 'get',
    params: date
  })
}

// 品质-根据分厂获取近30日趋势
export function getThirtyDayTrend(date) {
  return request({
    url: '/app/v1/produces/quality/factory-30days/rate',
    method: 'get',
    params: date
  })
}

// 品质-根据分厂获取产线合格率
export function findProductionLineQualifiedRate(date) {
  return request({
    url: '/app/v1/produces/quality/process/rate',
    method: 'get',
    params: date
  })
}

// 品质-问题TOP10
export function findProblem(date) {
  return request({
    url: '/app/v1/produces/quality/process/quantity',
    method: 'get',
    params: date
  })
}
// 品质-问题明细
export function findProblemDetails(date) {
  return request({
    url: '/app/v1/produces/quality/process-split/quantity',
    method: 'get',
    params: date
  })
}
